﻿using InnoWeb.CEND.Core.Model.Reports;
using InnoWeb.CEND.Data.Mapping.BaseMapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InnoWeb.CEND.Data.Mapping.Report
{
    public class ReportContentMapping : BaseMappingConfiguration<ReportContent, int>
    {
        public ReportContentMapping()
        {
            this.Property(a => a.Text).IsRequired().HasMaxLength(300);
            this.Property(a => a.TextTR).IsRequired().HasMaxLength(300);
            this.Property(a => a.VideoUrl).IsOptional();

            this.Property(a => a.ReportItemId);
            this.HasRequired(a => a.ReportItem).WithMany(a => a.ReportContents).HasForeignKey(a => a.ReportItemId);
        }
    }
}
